import { Express } from 'express'

import initMiddleware from "./initMiddleware.ts"
import TestTypeOrmConnect from './initTypeOrm.ts'
import initRouter from './initRouter.ts'
import initSwagger from './initSwagger.ts'
import config from "../config";

export default function useAppOption(app: Express) {
  initMiddleware(app)
  initRouter(app)
  app.config[config.BASE_CONFIG.keyConfig].database && TestTypeOrmConnect()
  initSwagger(app)
}
